package com.hngm.common;

import com.google.gson.Gson;

public class ResultList {
	private int code;//成功码
	private String msg;//提示信息
	private int count;//总数
	private Object data;//获取得数据
	
	
	public static String toClient(int code, String msg, int count, Object data){
		ResultList r = new ResultList();
		r.setCode(code);
		r.setCount(count);
		r.setMsg(msg);
		r.setData(data);
		Gson g = new Gson();
		return g.toJson(r);
	}
	
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	
	
}
